<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="/static/admin/css/default.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="/static/admin/easyui1.8.6/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="/static/admin/easyui1.8.6/themes/icon.css" />
    <script type="text/javascript" src="/static/admin/easyui1.8.6/jquery.min.js"></script>
    <script type="text/javascript" src="/static/admin/easyui1.8.6/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/static/admin/easyui1.8.6/locale/easyui-lang-zh_CN.js"></script>
</head>
<body>
<div id="toolbar">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">Add</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true">Edit</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-help',plain:true">Help</a>
</div>
<table id="dataList"></table>
</body>
<script type="text/javascript">
    $('#dataList').datagrid({
        url:"{:url('admin/role/index')}",
        singleSelect:true,
        pagination:true,
        toolbar:'#toolbar',
        columns:[[
            {field:'id',title:'ID',width:100},
            {field:'name',title:'名称',width:100},
            {field:'remark',title:'备注',width:300,align:'left'},
            {field: 'status',title: '状态',width: 100,align: 'center',formatter:function (val,row,index){
                if(val==1){
                    return '<span class="tag tag-success">正常</span>';
                } else {
                    return '<span class="tag tag-danger">禁用</span>';
                }
                }},
            {field: 'create_time',title: '创建时间'}
        ]]
    });
</script>
</html>